home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-09-19 | 8.8 KB | 230 lines | [TEXT/ALFA] |
- ----------------------
- BibTeX mode for Alpha
- ----------------------
-
- This document describes features of Bib mode and the BibTeX menu,
- which were written to simplify the use and maintenance of BibTeX
- citation database files.
-
- Bib Mode and the BibTeX menu
- ----------------------------
-
- Bib mode is entered when you open a file with a '.bib' suffix, or select
- the mode explicitly from the modes menu. In Bib mode,
-
- 1. A BibTeX menu is added to the menubar. From this menu, you can:
- (key bindings indicated where available)
-
- • Launch the BibTeX application.
-
- • Insert templates for any of the various BibTeX bibliography entry
- types or data fields.
-
- By default, only the required fields an the entry are included in
- the template. This can be customized as described below.
-
- • Select (highlight) the current entry (in which the cursor sits),
- allowing the entry to be easily moved, copied or deleted.
- (Ctl-Shift-B)
-
- • Jump to the next or previous entry.
- (Ctl-Shift-N or Ctl-Shift-P)
-
- • Reformat the current entry in a standard form, with data fields
- indented and aligned, and data-field delimiters made uniform.
- (Ctl-Shift-L)
-
- The data field indentation is controlled by the "indentString" mode
- variable in the mode-flags menu. The "fieldBraces" flag selects curly
- braces or double-quotes as the data-field delimiter; likewise, the
- "entryBraces" flag selects curly braces or parentheses as the
- data-field delimiter. The "fillColumn" variable controls line-wrapping.
-
- • Search for entries that match a given regular expression.
- (Ctl-Shift-M)
-
- • Search for entries in which a particular field matches a regular
- expression.
- (Ctl-Shift-F)
-
- Entries found in a search will be copied to a new window (the
- default) or back into the original buffer, replacing the previous
- contents of the buffer; this is controlled by the "overwriteBuffer"
- flag in the mode-flags menu. The contents of a ".bib" file,
- however, will never be overwritten by a search, since entries are
- typically lost.
-
- • Sort the database by cite-key, by first author, or by last author.
-
- The overwriteBuffer flag also controls whether the sorted database
- is written back to the original buffer or into a new one. A ".bib"
- file _can_ be overwritten by a sort, since no entries are lost.
-
- 2. Selecting 'Mark File' in the marks menu, on the sidebar, will
- add a mark for each entry in the bib file using the cite key of the
- entry. These are added in order of appearance in the file, but can
- subsequently be sorted alphabetically using the "Named Marks:Sort"
- command under the "Search" menu.
-
- 3. Key words in Bib files are automatically colorized.
-
-
- Key Bindings
- ------------
-
- Most of these functions (except template insertion) are also bound to
- keystrokes. The standard bindings are
-
- Ctl-Shift-N next entry
- Ctl-Shift-P previous entry
-
- Ctl-Shift-B select entry
- Ctl-Shift-L format entry
-
- Ctl-Shift-M search entries
- Ctl-Shift-F search fields
-
- tab next tab stop (as in TeX mode)
- Shift-tab previous tab stop ( " " " " )
- Ctl-tab nth tab stop ( " " " " )
- Cmd-tab clear tab stop ( " " " " )
-
- Opt-tab insert a tab ( " " " " )
-
- Although the TeX-mode keybindings aren't available in Bib mode, the
- LaTeX menu is left on the menubar. This may be useful for inserting the
- various text-style codes that are recognized in BibTeX fields.
-
-
- Customizing Entry Templates
- ---------------------------
-
- As mentioned above, by default only the required fields are included
- when a new bib entry is created. You can select any other set of fields
- by adding an appropriate entry to the 'myFld' array, following the
- example for the Article entry in the file :UserCode:bibtex.tcl file.
- Some day I'll make it easier to customize this, but for now it's
- necessary to modify bibtex.tcl.
-
- You should _not_ change the 'rqdFld' or 'optFld' arrays, since these
- will (some day) be used for syntax checking.
-
-
- Bugs, etc.
- ----------
-
- Bug reports, complaints and suggestions are very welcome. In
- particular, the code hasn't been tested for a wide variety of BibTeX
- data formats, so I don't know how robust my routines for parsing BibTeX
- entries really are. Some of my own ideas for additional features and/or
- improvements are listed further below.
-
- Comments and bug reports should be directed to
-
- Tom Pollard
-
- e-mail: pollard@cucbs.chem.columbia.edu
-
- snail-mail: 544 W 114th St #2R
- New York, NY 10025
- USA
-
-
- Version History
- ---------------
-
- 1.9 (9/94) 'getFields' should now correctly parse any legal entry.
- 'language' field now included.
- Default values for new fields (eg 'language') may be defined
- 'preferBraces' replaced by 'fieldBraces' and 'entryBraces'.
- line-wrapping is done on reformatted entries.
- '@string' entries preserved in sorts.
- text before first entry and after last entry are preserved
- by sorts.
- 1.8 (8/94) "getEntry" now recognizes parens as entry delimiters
- 1.7 (8/94) Bug fixes and accomodations to latex.tcl v2.2
- Template insertion streamlined
- Choose multiple fields at a time from a list dialog
- 1.6 (8/94) "preferBraces" allows braces or quotes to be default for
- new or reformatted entries,
- Menu built using $entryNames and $fieldNames,
- 'sortByAuthors' can now sort using last author first,
- and is a bit faster,
- 'formatEntry' rewrites entries in canonical format,
- More customization of canonical format allowed ('indentString')
- Bib mode definition adapted to Alpha 5.90.
- 1.5 (7/94) "sortByAuthors" is now robust,
- Mode of new windows now set correctly.
- 1.4 (7/94) Added sorting by authors, but still only semi-functional,
- Added regexp searching by field,
- "getEntry" bugs fixed.
- 1.2 (7/94) Bib mode definition adapted to Alpha 5.85,
- Added bib-file marking (bibMarkFile),
- Entry and field creation now controlled by data arrays.
- 1.1 (6/94) Custom BibTeX icon,
- Added simple search capability (matchingEntries).
- 1.0 (9/93) First stable version.
-
-
- Possible Future Enhancements
- ----------------------------
-
- 1. Sorting by other fields. Specifically, I'd like to have it
- sort by date, by first author and date, or by last author and date.
-
- 2. Allowing more customization of the 'standard' entry format used for
- new entries and the 'Format Entry' command.
-
- 3. Allowing the user to interactively choose the standard fields used
- for a given entry type.
-
- 4. Tighter integration with TeX mode; for instance, automatically
- opening the .bib files for a document by scanning the '\bibliography{}'
- command(s) in the document, and allowing single-keystroke jumps from a
- citation ('\cite{}') to the corresponding database entry. An easy way
- to paste cite keys into a TeX document might be nice, but I don't know
- what the most convenient way to do that would be.
-
- 5. Allowing more complicated searches. Logical 'AND' searches can be
- done now by doing additional searches on the results of previous ones.
- It would be nice to allow logical 'OR' searches by concatenating the
- results of successive searches to a database in the same buffer. Ideas
- for simple, intuitive ways to control this would be welcome.
-
- 6. Some sort of consistency and/or syntax checking of the database; for
- instance, verifying that all entries have the required fields and
- checking for duplicate entries.
-
- ?. Since the code parses BibTeX entries already, it would be easy to
- export .bib files to other formats, but I'm not sure if it's a good idea
- to start burdening Alpha with that sort of thing. Writing Perl scripts
- for file conversions is probably a better route. See, for instance, the
- "CC to BibTeX" Perl script (included in the :Tcl:UserCode:TextFilters
- folder), which converts citations from the on-line Current Contents
- database (the one at UC Berkeley, anyway) to BibTeX format.
-
-
- BibTeX application
- ------------------
-
- If you don't already have a BibTeX application, version 2.0 of MacBibTeX
- is available, among other places, from
-
- ftp.bluesky.com (198.145.40.2) pub/utilities/BibTeX.sea.hqx
-
- It was written by
-
- Jim Studt <jim@wucs1.wustl.edu> , and
- Michael Kahn <kahn@wucs1.wustl.edu>
-
- based on Oren Patashnik's original BibTeX 0.99c .
-
- Acknowledgments:
- ----------------
-
- This package was inspired by LaTeX support package (latex.tcl), written by
-
- Richard T. Austin <austin@eecs.umich.edu> , and (currently),
- Tom Scavo <trscavo@syr.edu>
-
- ---------------------------------------------------------------------------